import request from '@utils/request'

// 查询
export function getSwitch (data) {
  return request({
    url: '/function/find',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 新增
export function addSwitch (data) {
  return request({
    url: '/function/save',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 修改
export function updateSwitch (data) {
  return request({
    url: '/function/update',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}